//
//  CppObjcHelper.mm
//  CrazyChicken
//
//  Created by HuyNC on 3/22/14.
//
//

NSString* kShowAdNotification = @"kShowAdNotification";
NSString* kHideAdNotification = @"kHideAdNotification";

#include "CppObjcHelper.h"

CppObjcHelper* CppObjcHelper::instance = 0;

CppObjcHelper::CppObjcHelper(){
    
}


CppObjcHelper* CppObjcHelper::getInstance(){
    if(instance){
        instance = new CppObjcHelper;
    }
    return instance;
}

void CppObjcHelper::openAppInAppstore(){
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/us/app/math-racing-go/id856606991"]];
}

void CppObjcHelper::showAd(){
    [[NSNotificationCenter defaultCenter] postNotificationName:kShowAdNotification object:nil];
}

void CppObjcHelper::hideAd(){
    [[NSNotificationCenter defaultCenter] postNotificationName:kHideAdNotification object:nil];
}